package org.game;

import java.lang.reflect.Constructor;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentSkipListMap;

import javax.sql.DataSource;

import org.game.db.vo.PlayerDataVO;
import org.quartz.TriggerUtils;
import org.quartz.impl.triggers.CronTriggerImpl;

import com.sojoys.artifact.build.data.base.BaseDao;
import com.sojoys.artifact.constant.ConfigConstant;
import com.sojoys.artifact.constant.CreateTableEnum;
import com.sojoys.artifact.manager.ContextManager;
import com.sojoys.artifact.manager.DataSourceManager;
import com.sojoys.artifact.manager.PropManager;
import com.xiaoleilu.hutool.date.DateTime;
import com.xiaoleilu.hutool.date.DateUtil;
import com.xiaoleilu.hutool.util.ClassUtil;

/**
 * Hello world!
 *
 */
public class App {
	public static void main(String[] args) throws Exception {
//		PropManager.use("app.properties");
//		// 初始配置文件
//		ContextManager.me().init("app-init.xml");
//		
//		Set<Class<?>> scanClasses = ClassUtil.scanPackageBySuper(PropManager.get(ConfigConstant.CONFIG_SCAN_DAO),BaseDao.class);
//		DataSource ds =  DataSourceManager.me().getBuildSources();
//		for (Class<?> clazz : scanClasses) {
//			clazz = Class.forName(clazz.getName());
//			Constructor cons = clazz.getDeclaredConstructor(null);
//			cons.setAccessible(true);
//			BaseDao<?, ?> dao = (BaseDao<?, ?>) cons.newInstance(null);
//			
//			dao.createTable(ds,CreateTableEnum.DESIGN);
//
//		}
		
		
//		CronTriggerImpl cronTriggerImpl = new CronTriggerImpl();
//		cronTriggerImpl.setCronExpression("0 0 0 1/1 * ?");
//		//  DateUtil.offsetDay(DateUtil.date(), 5)
//		DateTime nowDate = DateUtil.date();
//		List<Date> dates = TriggerUtils.computeFireTimesBetween(cronTriggerImpl, null, nowDate,nowDate);
//		for (Date date : dates) {
//			System.out.println(DateUtil.format(date, "yyyy-MM-dd HH:mm:ss"));
//		}
		
		ConcurrentSkipListMap cache = new ConcurrentSkipListMap();
		System.out.println(cache.remove(1));
	}
}
